//
//  ViewController.m
//  分享
//
//  Created by Looper on 15/9/14.
//  Copyright (c) 2015年 Looper. All rights reserved.
//

#import "ViewController.h"
#import "LZWCustomActionSheet.h"
#import "UMSocial.h"

@interface ViewController ()<doneSelect,UMSocialUIDelegate>
{
    UIView *_view;
}
@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    [self createButton];    
}

#pragma mark - 分享按钮
- (void)createButton
{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(150, 50, 40, 25);
    button.backgroundColor = [UIColor greenColor];
    [button addTarget:self action:@selector(createActionSheet) forControlEvents:UIControlEventTouchUpInside];
    [button setTitle:@"分享" forState: UIControlStateNormal];
    [self.view addSubview:button];
}

#pragma mark - 上拉菜单
- (void)createActionSheet
{
    _view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 200)];
    [self.view addSubview:_view];
    
    LZWCustomActionSheet *sheet = [[LZWCustomActionSheet alloc] initWithView:_view AndHeight:244];
    sheet.doneDelegate = self;
    [sheet showInView:self.view];
    
    [_view addSubview:[[LZWCustomActionSheet shareinstance] ShareQQWithFrame:CGRectMake(20, 70, 50, 50) andImageNormal:[UIImage imageNamed:@"share_qq.png"] andImageSelected:[UIImage imageNamed:@"share_qq_highlighted.png"] andTag:0]];
    
    [_view addSubview:[[LZWCustomActionSheet shareinstance] ShareWeiXinWithFrame:CGRectMake(90, 70, 50, 50) andImageNormal:[UIImage imageNamed:@"share_wc.png"] andImageSelected:[UIImage imageNamed:@"share_wcH.png"] andTag:1]];

    [_view addSubview:[[LZWCustomActionSheet shareinstance] ShareQzoneWithFrame:CGRectMake(160, 70, 50, 50) andImageNormal:[UIImage imageNamed:@"share_qzone.png"] andImageSelected:[UIImage imageNamed:@"share_qzone_highlighted.png"] andTag:2]];
    
    [_view addSubview:[[LZWCustomActionSheet shareinstance] ShareWeiboWithFrame:CGRectMake(230, 70, 50, 50) andImageNormal:[UIImage imageNamed:@"share_sina.png"] andImageSelected:[UIImage imageNamed:@"share_sinaH.png"] andTag:3]];
}

- (void)done
{
    NSLog(@"ddd");
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
